﻿using SqlSugar;

namespace BW.MesProject.Equipment.Domain
{
    /// <summary>
    /// 实体基类
    /// </summary>
    public class BaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey =true)]
        public long Id { get; set; }

        /// <summary>
        /// 逻辑删除
        /// </summary>
        public bool IsDeleted { get; set; } = false;

        /// <summary>
        /// 创建人，可以为空
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string CreatedBy { get; set; }

        /// <summary>
        /// 创建时间，默认为当前系统时间
        /// </summary>
        public DateTime CreatedTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 更新人，可以为空
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string UpdatedBy { get; set; }

        /// <summary>
        /// 更新时间，默认为当前系统时间
        /// </summary>
        public DateTime UpdatedTime { get; set; } = DateTime.Now;
    }
}
